package com.software.practicecenter.repository;

import com.software.practicecenter.entity.Question;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.transaction.annotation.Transactional;

import java.util.Collection;
import java.util.List;

/**
 * @Author xiaoliao
 * @Date 2023/5/31 14:40
 */
@Transactional
public interface QuestionRepository extends JpaRepository<Question, String> , JpaSpecificationExecutor<Question> {
    List<Question> findQuestionByBelongChapter(String belongChapter);

    List<Question> findByIdIn(Collection<String> ids);

    Question findQuestionById(String id);
}
